ADD SHARDING RULE r1 COLUMNS w_id;
ADD SHARDING RULE r2 COLUMNS id;
ADD SHARDING RULE r3 COLUMNS bid;

ADD SHARDING RULE t1 TABLE orders COLUMN iid;
ADD SHARDING RULE t2 TABLE delivery COLUMN order_id;

ADD KEY RANGE krid3 FROM 21 TO 30 ROUTE TO sh2;
ADD KEY RANGE krid2 FROM 11 TO 20 ROUTE TO sh1;
ADD KEY RANGE krid1 FROM 1 TO 10 ROUTE TO sh1;

ADD KEY RANGE krid4 FROM 00000000-0000-0000-0000-000000000000 TO 80000000-0000-0000-0000-000000000000 ROUTE TO sh1;
ADD KEY RANGE krid5 FROM 80000000-0000-0000-0000-000000000001 TO FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF ROUTE TO sh2;